<!--Copyright (C) Kherty.  All rights reserved.-->
<ResourceDictionary
    x:Class="OpenLS.Chart.UI.BarSeriesPropertiesResources"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:chart="http://schemas.Kherty.com/office/2007/chart"
    xmlns:drawing="http://schemas.Kherty.com/office/2007/drawing"
    xmlns:Internals="clr-namespace:OpenLS.Chart.UI.Internals"
    xmlns:chartui="clr-namespace:OpenLS.Chart.UI"
    xmlns:Internals1="clr-namespace:OpenLS.Drawing.UI.Internals;assembly=OpenLS.Drawing.UI"
    >
    
        <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
    <DataTemplate DataType="{x:Type chart:Series}" x:Key="t">
        <TabControl TabStripPlacement ="Left" chartui:ChartElement.ViewModel="{Binding Converter={x:Static Internals:ChartConverters.ViewModelFactory}}">
            <TabItem Header="{x:Static Internals:UIStringTable.SeriesOptions}">
                <StackPanel>
                    <GroupBox Header="{x:Static Internals:UIStringTable.SeriesOverlap}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition/>
                                <RowDefinition/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{x:Static Internals:UIStringTable.Separated}"/>
                <Slider Grid.Column="1" Minimum ="-100" Maximum="100" Value ="{Binding Path=(chartui:ChartElement.Chart).Overlap, RelativeSource={RelativeSource Self}}" Name="overlapSlider"/>
                <TextBlock Grid.Column="2" Text="{x:Static Internals:UIStringTable.Overlapped}"/>
                <TextBlock Grid.Row="1" Grid.ColumnSpan="3" Text="{Binding (chartui:ChartElement.Chart).Overlap, RelativeSource={RelativeSource Self}}" HorizontalAlignment ="Center"/>
              </Grid>

                    </GroupBox>
                    <GroupBox Header="{x:Static Internals:UIStringTable.GapWidth}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition/>
                                <RowDefinition/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{x:Static Internals:UIStringTable.NoGap}"/>
                <Slider Grid.Column="1" Minimum ="0" Maximum="500" Value ="{Binding (chartui:ChartElement.Chart).GapWidth, RelativeSource={RelativeSource Self}}" Name="gapWidthSlider"/>
                <TextBlock Grid.Column="2" Text="{x:Static Internals:UIStringTable.LargeGap}"/>
                <StackPanel HorizontalAlignment ="Center" Orientation ="Horizontal" Grid.Row ="1" Grid.ColumnSpan="3">
                  <TextBlock Text="{Binding (chartui:ChartElement.Chart).GapWidth, RelativeSource={RelativeSource Self}}"/>
                  <TextBlock Text="%"/>
                </StackPanel>
              </Grid>
                    </GroupBox>
                </StackPanel>
            </TabItem>
            <TabItem Header="{x:Static Internals:UIStringTable.Shape}" Name="test">
                <TabItem.Visibility>
                    <Binding RelativeSource="{RelativeSource Self}" Path="(chartui:ChartElement.Chart)" ConverterParameter="{x:Type chart:Bar3DChart}">
                        <Binding.Converter>
                            <Internals1:IsOfTypeConverter/>
                        </Binding.Converter>
                    </Binding>
                </TabItem.Visibility>
                <GroupBox>
                    <ContentControl Content="{Binding}" ContentTemplate="{x:Static chartui:ChartShapeResources.ShapeTemplate}"></ContentControl>
                </GroupBox>
            </TabItem>
            <TabItem Header="{x:Static Internals:UIStringTable.Fill}">
                <StackPanel>
                    <GroupBox 
                        drawing:DrawingElement.ShapeProperties="{Binding Path=(chartui:SeriesElement.Series).ShapeProperties, RelativeSource={RelativeSource Self}}">
                    <!--    <ContentControl Content="{Binding}" ContentTemplate="{x:Static chartui:ShapedPropertiesResources.FillPropertiesTemplate}"/> -->
                       <!-- <TextBlock Text="notused"></TextBlock> -->
                        <ContentControl Content="{Binding RelativeSource={RelativeSource Self}, Path=(chartui:ChartElement.ViewModel).FillFormatter}"></ContentControl>
                    </GroupBox>
                    <CheckBox IsChecked="{Binding Path=(chartui:ChartElement.Chart).VaryColors, RelativeSource={RelativeSource Self}}" Content="{x:Static Internals:UIStringTable.VaryColorByPoint}"></CheckBox>
                </StackPanel>
            </TabItem>
            <TabItem Header="{x:Static Internals:UIStringTable.BorderColor}">
                <StackPanel>
                    <GroupBox>
                  <!--  <ContentControl Content="{Binding}" ContentTemplate="{x:Static chartui:ShapedPropertiesResources.LineFillPropertiesTemplate}"/> -->
                        <ContentControl Content="{Binding Path=(chartui:ChartElement.ViewModel).LineFillFormatter, RelativeSource={RelativeSource Self}}" />

                    </GroupBox>
                </StackPanel>

            </TabItem>
            <TabItem Header="{x:Static Internals:UIStringTable.BorderStyles}">
                <GroupBox  >
                    <ContentControl Content="{Binding Path=(chartui:ChartElement.ViewModel).LineStyleFormatter, RelativeSource={RelativeSource Self}}" />
                </GroupBox>

            </TabItem>
            <TabItem Header="{x:Static Internals:UIStringTable.Shadow}"/>
            <TabItem Header="{x:Static Internals:UIStringTable.Format3D}">
                <ContentControl Content="{Binding Path=(chartui:ChartElement.ChartArea).View3D, RelativeSource={RelativeSource Self}}"/>
            </TabItem>
        </TabControl>

    </DataTemplate >
   <!-- <DataTemplate DataType="{x:Type chart:Series}">
        <ContentPresenter ContentTemplate="{StaticResource t}"/>
    </DataTemplate>
 -->

    <DataTemplate DataType="{x:Type chart:BarSeries}">
        <ContentPresenter ContentTemplate="{StaticResource t}"/>
    </DataTemplate>

    
</ResourceDictionary>